﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<EPPLib.Data.TransactionLogDataObject>>" %>

<asp:Content ID="mainContent" ContentPlaceHolderID="mainContentPlaceholder" runat="server">

    <h2>Log transazioni</h2>

    <table>
        <tr>
            <th>
                ID Interno
            </th>
            <th>
                Sessione
            </th>
            <th>
                Server
            </th>
            <th>
                ID Transazione Server
            </th>
            <th>
                ID Transazione Client
            </th>
            <th>
                Richiesta
            </th>
            <th>
                Risposta
            </th>
            <th>
                Data transazione
            </th>
            <th></th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td class="center">
                <%: item.InternalID %>
            </td>
            <td>
                <%: item.Session %>
            </td>
            <td>
                <%: item.TargetUrl %>
            </td>
            <td>
                <%: item.ServerTransactionID %>
            </td>
            <td>
                <%: item.ClientTransactionID %>
            </td>
            <td>
                <%: item.RequestRawData.Length > 200 ? item.RequestRawData.Substring(0, 200) + "..." : item.RequestRawData%>
            </td>
            <td>
                <%: item.ResponseRawData.Length > 200 ? item.ResponseRawData.Substring(0, 200) + "..." : item.ResponseRawData %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.TransactionDate) %>
            </td>
            <td>
                <a href="<%: Url.Action("Detail", new { id = item.InternalID }) %>" rel="shadowbox;height=600;width=800"><img src="/Content/Images/detail.png" alt="Dettagli" /></a>
            </td>
        </tr>
    
    <% } %>

    </table>
</asp:Content>

<asp:Content ID="titleContent" ContentPlaceHolderID="titleContentPlaceholder" runat="server">
    eppclient.it - Log transazioni
</asp:Content>